<cpanel include="../../config.php">

<?

/***************************************************************************
 *                                 webmail_login.php
 *                            -------------------
 *   Begin                : Thursday, April 16, 2005
 *   Copyright            : (C) 2005 Point and Code
 *   Domain               : http://www.pointandcode.com/
 *   Email                : support@pointandcode.com
 *   Version              : 1.0.0
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

$html_root_path = '../../';
$page_title = "Email Accounts";
include $root_path.'common.php';
include $root_path.'page_header.php';


$template->set_filenames(array(
	'body' => $root_path.$template_path.'mail/webmail_login.tpl')
);



$template->assign_vars(array(
	'U_NEOMAIL' => "/neomail/neomail.pl",
	'U_HORDE' => "/horde/index.php",
	'U_SQUIRRELMAIL' => "/3rdparty/squirrelmail/index.php",
));


//
// We have switches here, to detect which of the three webmail applications are installed...
//
$is_neomail_installed = <<<EOF
<cpanelif !$CONF{'skipneomail'} $CPDATA{'FEATURE-NEOMAIL'}>test</cpanelif>
EOF;

if (!empty($is_neomail_installed)) {
	$template->assign_block_vars('switch_neomail', array());
}

$is_horde_installed = <<<EOF
<cpanelif !$CONF{'skiphorde'} $CPDATA{'FEATURE-HORDE'}>test</cpanelif>
EOF;

if (!empty($is_horde_installed)) {
	$template->assign_block_vars('switch_horde', array());
}

$is_squirrelmail_installed = <<<EOF
<cpanelif !$CONF{'skipsqmail'} $CPDATA{'FEATURE-SQMAIL'}>test</cpanelif>
EOF;

if (!empty($is_squirrelmail_installed)) {
	$template->assign_block_vars('switch_squirrelmail', array());
}


//
// Woohoo! All done!
//
$template->pparse('body');

include $root_path.'page_tail.php';


?>